package com.stylefeng.guns.modular.customer.warpper;

import com.stylefeng.guns.core.base.warpper.BaseControllerWarpper;
import com.stylefeng.guns.core.common.constant.factory.ConstantFactory;
import com.stylefeng.guns.modular.customer.util.CustomerUtil;
import org.apache.commons.collections.MapUtils;

import java.util.Map;

public class PurchaseWrapper extends BaseControllerWarpper {

    public PurchaseWrapper(Object obj) {
        super(obj);
    }

    @Override
    protected void warpTheMap(Map<String, Object> map) {
        Integer customerCompanyId = MapUtils.getInteger(map,"customerCompanyId");
        map.put("customerCompanyName", ConstantFactory.me().getCustomerCompanyName(customerCompanyId));
        CustomerUtil.putAuthority(map,customerCompanyId);
    }
}
